package com.cjack.frenchexcel.controller;

import com.cjack.frenchexcel.config.AjaxResult;
import com.cjack.frenchexcel.config.LayPage;
import com.cjack.frenchexcel.model.RegisterInfoModel;
import com.cjack.frenchexcel.service.RegisterInfoService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

@Slf4j
@RestController
@RequestMapping("/registerInfo")
public class RegisterInfoEndpoint extends BaseEndpoint {

    @Autowired
    private RegisterInfoService registerInfoService;

    @RequestMapping(value = "/list", method = RequestMethod.GET)
    public AjaxResult list(LayPage layPage, RegisterInfoModel model) {
        return AjaxResult.SUCCESS(registerInfoService.list(layPage, model));
    }
    @RequestMapping(value = "/update", method = RequestMethod.POST)
    public AjaxResult update(RegisterInfoModel model) {
        return AjaxResult.SUCCESS(registerInfoService.update(model));
    }
}
